var tview = require("./taskView.js");
var cw = require("../components/winLocation.js");
var fs = 70;
$(document).on("pageinit", "#taskPage", controllerInit);

function controllerInit() {
    cw.QueryString.Initial();
    fs = cw.QueryString.GetValue("fs");
    console.log("sfdsdf");
    tview.setContentHeight();
    createRadial(fs);

}

// 创建分数圆圈
function createRadial(fs) {
    $('#indicatorContainer').radialIndicator({
        barColor: {
            0: '#FFFFFF',
            33: '#FFFFFF',
            66: '#FFFFFF',
            100: '#FFFFFF'
        },
        displayNumber: true,
        initValue: 20,
        radius:35,
        barWidth: 2,
        barBgColor:'#BFD4DE',
        fontSize: 35
    });
    var radiusObject = $('#indicatorContainer').data('radialIndicator');

    radiusObject.animate(fs);
    bindEvent();
}

// 绑定事件
function bindEvent () {
    $("div[data-fs]").on("click",function  () {
        var fsName = $(this).attr("data-fs");
        location.href = "./developing.html?fsName=" + fsName;
    });
    //d-添加　返回信用分
    $("#showTooltips").on("click",function(){
    	location.href = "./credit.html"; 
    });
    $("#fanhui").on("click",function  () {
//      window.history.back(); 
		history.back();
         
    });
    
    
}




